﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using TextMining;

namespace Clustering
{
    /// <summary>
    /// Interaction logic for DocumentViewer.xaml
    /// </summary>
    public partial class DocumentViewer : Window
    {
        private Document _document;

        public DocumentViewer(Document document)
        {
            InitializeComponent();

            _document = document;
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            WordsListView.DataContext = from word in _document.Words
                                        where word.Value.Key.IsImportant == true
                                        orderby word.Value.Value descending
                                        select word;
        }
    }
}
